package encapsulation;

/**
 * @classname:MusicPlay
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/28 11:38
 * @version: 0.1
 * @since:1.8
 */
public class MusicPlay {
    private String musicPlayerName;
    private Music music;
    public MusicPlay() {
    }
    public MusicPlay(String musicPlayerName) {
        this.musicPlayerName = musicPlayerName;
    }

    public String getMusicPlayerName() {
        return musicPlayerName;
    }

    public void setMusicPlayerName(String musicPlayerName) {
        this.musicPlayerName = musicPlayerName;
    }

    public Music getMusic() {
        return music;
    }

    public void setMusic(Music music) {
        this.music = music;
    }

    public void transmit(){
        System.out.println("正在使用"+getMusicPlayerName()+"播放"+music.getPlayer()+"的音乐["+music.getMusicName()+"]剩余时间"+music.getPlaytime());

    }
}
